package cn.hpe.po;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;

/**
 * DataCommentDao entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "datacomment")
public class Datacomment implements java.io.Serializable {

	// Fields

	private Integer dcid;
	private Userinfo userinfo;
	private String dcmsg;
	private Integer dataId;

//	@Column
//	private Integer replayDcid;

	// Constructors

	/** default constructor */
	public Datacomment() {
	}

	/** full constructor */
	public Datacomment(Userinfo userinfo, String dcmsg, Integer dataId) {
		this.userinfo = userinfo;
		this.dcmsg = dcmsg;
		this.dataId = dataId;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "DCId", unique = true, nullable = false)
	public Integer getDcid() {
		return this.dcid;
	}

	public void setDcid(Integer dcid) {
		this.dcid = dcid;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "UserEmail")
	public Userinfo getUserinfo() {
		return this.userinfo;
	}

	public void setUserinfo(Userinfo userinfo) {
		this.userinfo = userinfo;
	}

	@Column(name = "DCMsg")
	public String getDcmsg() {
		return this.dcmsg;
	}

	public void setDcmsg(String dcmsg) {
		this.dcmsg = dcmsg;
	}

	@Column(name = "DataId")
	public Integer getDataId() {
		return this.dataId;
	}

	public void setDataId(Integer dataId) {
		this.dataId = dataId;
	}

}